package com.hzcx.app.simplechat.ui.friend.presenter;

import android.content.Context;

import com.hzcx.app.simplechat.api.BaseObserver;
import com.hzcx.app.simplechat.base.BasePresenter;
import com.hzcx.app.simplechat.model.FriendModel;
import com.hzcx.app.simplechat.ui.friend.bean.FriendBean;
import com.hzcx.app.simplechat.ui.friend.bean.FriendCityBean;
import com.hzcx.app.simplechat.ui.friend.contract.FriendContract;
import com.hzcx.app.simplechat.ui.friend.contract.FriendSearchContract;
import com.hzcx.app.simplechat.ui.main.bean.FriendRequestCountBean;

import java.util.List;

public class FriendSearchPresenter extends BasePresenter<FriendSearchContract.View> implements FriendSearchContract.Presenter {


    /**
     * 搜索通讯录
     *
     * @param context
     */
    @Override
    public void searchFriendList(Context context, String serch_keys) {
        FriendModel.searchFriend(context, serch_keys, new BaseObserver<List<FriendCityBean>>() {
            @Override
            protected void onSuccess(List<FriendCityBean> data) {
                mView.searchResult(data);
            }
        });
    }
}
